<div class="tableToolbar">
	<div class="coll-md-8" id="addInput">
		<div class="coll-md-2">
			<input type="text" class='search' placeholder="图片名称" ng-model="ctrlScope.itemsearch.name">
		</div>
		<div class="coll-md-2">
			<div class="coll-md-10 triangle">
				<select class="form-control" ng-model="ctrlScope.itemsearch.pictureType">
					<option selected disabled hidden value="">图片类型</option>
					<!--<option value="1">PC端首页滚动</option>-->
					<option value="6">移动端首页滚动</option>
					<!--<option value="8">项目图标</option>-->
					<option value="7">活动中心</option>
					<option value="9">APP弹屏图片</option>
				</select>
			</div>
		</div>
		<div class="coll-md-2">
			<input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
			<input type="button" class="small-icon search2" value="搜索">
			<input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
			<input type="button" class="small-icon reset" value="重置">
		</div>
	</div>
	<div class="coll-md-2">
		<input type="button" class="bttn pos-right"  ng-click="addOrderModal()" value="新建">
	</div>
</div>
<table ui-table="orderParams" style="table-layout: fixed">
	<thead>
		<tr>
			<th>ID</th>
			<th>图片名称</th>
			<th>图片类型</th>
			<th width="20%">URL</th>
			<th>图片地址</th>
			<th>添加时间</th>
			<th>添加ip</th>
			<th>排序</th>
			<th>操作</th>
		</tr>
	</thead>

	<tbody>
		<tr ng-repeat="item in orderParams.$rows">
			<td>{{item.id}}</td>
			<td>{{item.pictureName}}</td>
			<td>{{item.pictureType | pictureType}}</td>
			<td>
			<div  style="width:100%;overflow: hidden;text-overflow: ellipsis;">
				{{item.pictureUrl}}
			</div>
			</td>
			<td style="padding:4px 0;" ><img src="{{item.picturePath}}" width="80" height="50" ng-click="openMaxPic(item.picturePath)"/></td>
			<td>{{item.addtime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
			<td>{{item.addip}}</td>
			<td>{{item.sequence}}</td>
			<td>
				<a ng-click="modifyModal(item.id)">编辑</a>
				<a ng-click="delModal(item.id)">删除</a>
			</td>
		</tr>
	</tbody>
</table>
<maxmodal title="查看图片" visible="MaxPicModal">
	<div style="text-align: center">
		<img ng-src="{{url}}" alt="" width="1000">
	</div>

</maxmodal>
<modal title="新建" visible="addModal">
	<form class="form-horizontal" role="form" name="myForm" ng-submit="adoptAdd(myForm.$valid)" novalidate>
			<div class="form-body">
			<div class="row">
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">图片超链接：</label>
						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="add.pictureUrl" required >
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">排序：</label>

						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="add.sequence" required >
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">图片名称：</label>
						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="add.pictureName" required>
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">图片类型：</label>
						<div class="col-md-8 triangle-left">
							<select ng-model="add.pictureType" class="form-control" ui-select2="select2Options" required>
								<option selected disabled hidden value="">请选择</option>
								<!--<option value="1">PC端首页滚动</option>-->
								<option value="6">移动端首页滚动</option>
								<!--<option value="8">项目图标</option>-->
								<option value="7">活动中心</option>
								<option value="9">APP弹屏图片</option>
							</select>
						</div>
					</div>
				</div>
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label col-md-2">上传图片：</label>
							<form name="uploadForm">
								<div class="col-md-2" id="area1">
									<ul style="list-style-type:none; margin:0;width:130px;height:130px;overflow:hidden">
										<li ng-repeat="img in imgs track by $index " style="width:130px;height:130px;margin:10px 10px 10px 0;float:left;position:relative">
											<img ng-src="{{ img }}" width="120" height="120" />
											<span class="icon-close img-close" style='position:absolute;right:2px;top:-10px;' ng-click="removeImg($index)"></span>
										</li>
										<li ngf-select="uploadPic(file)" ng-model="file" name="file" ngf-pattern="'image/*'"
											ngf-accept="'image/*'" ngf-max-size="20MB"
											style="width:130px;float: left;margin:10px 10px 10px 0;display:inline">
											<img style="cursor:pointer"
												 src="css/img/updatepic.png" width="120" height="120" />
										</li>
									</ul>
									<!--<ul style="list-style-type:none; margin:0;width:130px;height:120px;overflow: hidden">-->
										<!--<li ng-repeat="img in imgs" style="width:130px;float: left;display:inline;margin-right: 10px;position:relative">-->
											<!--<img ng-src="{{ img }}" width="120" height="120" />-->
										<!--</li>-->
										<!--<li ngf-select="uploadPic(file)" ng-model="file" name="file" ngf-pattern="'image/*'"-->
											<!--ngf-accept="'image/*'" ngf-max-size="20MB"-->
											<!--style="width:200px;float: left;display:inline">-->
											<!--<img style="border:1px;cursor:pointer"-->
												 <!--src="css/img/updatepic.png" width="120" height="120"  alt />-->
										<!--</li>-->
									<!--</ul>-->
								</div>
								<div class="col-md-6">
									宽：{{ww}}&nbsp;高：{{hh}}

								</div>
								<input type="hidden" ng-model="pics" name="pics" value="{{pics}}" id="pics"/>

							</form>
						</div>
					</div>
			</div>
				<div class="buttonArea col-md-12">
					<button type="submit" class="btn blue" ng-disabled="myForm.$invalid">确认</button>
				</div>

		</div>
	</form>
</modal>
<modal title="编辑" visible="detailsModal">
	<form class="form-horizontal">
		<div class="form-body">
			<div class="row">
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">图片超链接：</label>
						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="list.pictureUrl">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">排序：</label>

						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="list.sequence" />
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">图片名称：</label>
						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="list.pictureName">
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">图片类型：</label>
						<div class="col-md-8 triangle-left">
							<select ng-model="list.pictureType" class="form-control"  ui-select2="select2Options">
								<!--<option value="1">PC端首页滚动</option>-->
								<option value="6">移动端首页滚动</option>
								<!--<option value="8">项目图标</option>-->
								<option value="7">活动中心</option>
								<option value="9">弹屏图片</option>
							</select>
						</div>
					</div>
				</div>
				<div class="col-md-12">
					<div class="form-group">
						<label class="control-label col-md-2">图片展示：</label>
						<div class="col-md-10">
							<div class="form-group">
								<div class="col-md-2">

									<img ng-src="{{ list.picturePath }}" width="120" height="120" />

									</div>
								<div class="col-md-6">
									宽：{{ww}}&nbsp;高：{{hh}}

								</div>
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="buttonArea col-md-12">
				<button type="submit" class="btn blue" ng-click="saveSubmit(rechargeStatus)">保存</button>
			</div>

		</div>
	</form>
</modal>